package com.sam4cloud.auth.project.model.dto;

import com.sam4cloud.auth.project.enums.LoginTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "LoginDTO对象", description = "登陆请求")
public class LoginDTO {


    @NotBlank(message = "请输入手机号")
    @ApiModelProperty(value = "手机号", example = "18700873648")
    private String loginName;

    @NotBlank(message = "请输入密码")
    @ApiModelProperty(value = "密码", example = "xxxx")
    private String password;

    @ApiModelProperty(value = "验证码", example = "123456")
    @NotBlank(message = "验证码不能为空")
    @Pattern(regexp = "\\d{6}", message = "请输入6位数字")
    private String code;

    @ApiModelProperty(value = "登录方式(account/sms/wx_mp/wx_mini)", example = "account")
    @NotBlank(message = "登录方式不能为空")
    private LoginTypeEnum loginType;

    @ApiModelProperty(value = "是否检查密码", hidden = true)
    private Boolean checkPsw;
}
